package com.sytc.camera.dllinterface;

public enum FX3_FWDWNLOAD_MEDIA_TYPE {
    RAM(1),
    I2CE2PROM(2),
    SPIFLASH(3);

    private final int value;

    FX3_FWDWNLOAD_MEDIA_TYPE(int value) {
        this.value = value;
    }

    public int getValue() {
        return this.value;
    }

    // 根据整数值获取枚举
    public static FX3_FWDWNLOAD_MEDIA_TYPE fromInt(int i) {
        for (FX3_FWDWNLOAD_MEDIA_TYPE type : FX3_FWDWNLOAD_MEDIA_TYPE.values()) {
            if (type.getValue() == i) {
                return type;
            }
        }
        return null;  // 如果没有匹配的，返回 null
    }
}
